package com.luxoft.scoremanager.testpack;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

import java.util.ArrayList;
import static com.luxoft.scoremanager.testpack.BrowserType.*;

public class DriverBuilder {
    static java.util.List<BrowserType> driverSwing = new ArrayList<BrowserType>();
    private static WebDriver driver;

    public static WebDriver getDriver(BrowserType k) {
        if (k.equals(CHROME)) {
            driver = new ChromeDriver();
        }

        if (k.equals(FIREFOX)) {
            driver = new FirefoxDriver();
        }

        if (k.equals(INTERNET_EXPLORER)) {
            driver = new InternetExplorerDriver();
        }

        return driver;
    }
}
